home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
MATH
/
COMPLX
/
CDEMO.TXT
< prev
next >
Wrap
Text File
|
1992-01-15
|
31KB
|
518 lines
Demo ComplexOPs PROCEDUREs and FUNCTIONs
Notes: 1. CIS(w) = COS(w) + i*SIN(w), w = -PI..PI
2. z = x + i*y
Complex number definition/conversion/output: CSet/CConvert/CStr
z rectangular z polar
--------------------------- -----------------------------
1 0.00000000 + 0.00000000i 0.00000000*CIS( 0.00000000)
2 0.50000000 + 0.50000000i 0.70710678*CIS( 0.78539816)
3 -0.50000000 + 0.50000000i 0.70710678*CIS( 2.35619449)
4 -0.50000000 - 0.50000000i 0.70710678*CIS( -2.35619449)
5 0.50000000 - 0.50000000i 0.70710678*CIS( -0.78539816)
6 1.00000000 + 0.00000000i 1.00000000*CIS( 0.00000000)
7 1.00000000 + 1.00000000i 1.41421356*CIS( 0.78539816)
8 0.00000000 + 1.00000000i 1.00000000*CIS( 1.57079633)
9 -1.00000000 + 1.00000000i 1.41421356*CIS( 2.35619449)
10 -1.00000000 + 0.00000000i 1.00000000*CIS( 3.14159265)
11 -1.00000000 - 1.00000000i 1.41421356*CIS( -2.35619449)
12 0.00000000 - 1.00000000i 1.00000000*CIS( -1.57079633)
13 1.00000000 - 1.00000000i 1.41421356*CIS( -0.78539816)
14 5.00000000 + 0.00000000i 5.00000000*CIS( 0.00000000)
15 5.00000000 + 3.00000000i 5.83095189*CIS( 0.54041950)
16 0.00000000 + 3.00000000i 3.00000000*CIS( 1.57079633)
17 -5.00000000 + 3.00000000i 5.83095189*CIS( 2.60117315)
18 -5.00000000 + 0.00000000i 5.00000000*CIS( 3.14159265)
19 -5.00000000 - 3.00000000i 5.83095189*CIS( -2.60117315)
20 0.00000000 - 3.00000000i 3.00000000*CIS( -1.57079633)
21 -5.00000000 - 3.00000000i 5.83095189*CIS( -2.60117315)
Complex arithmetic: CAdd, CSub, CMult, CDiv
Let z1 = 1.000 + 1.000i or 1.414*CIS( 0.785)
z2 = 1.732 - 1.000i or 2.000*CIS( -0.524)
z1 + z2 = 2.732 + 0.000i or 2.732*CIS( 0.000)
z1 - z2 = -0.732 + 2.000i or 2.130*CIS( 1.922)
z1 * z2 = 2.732 + 0.732i or 2.828*CIS( 0.262)
z1 / z2 = 0.183 + 0.683i or 0.707*CIS( 1.309)
Complex natural logarithm: CLn = LN(z)
Notes: 1. LN(z) is multivalued.
2. Any multiple of 2*PI*i could be added to/subtracted from LN(z).
3. LN(1)=0; LN(-1)=PI*i; LN(+/-i)=+/-0.5*PI*i.
LN(z)
z rectangular EXP( LN(z) ) = z
------------ --------------------------- ---------------------------
1 0.0 + 0.0i undefined
2 0.5 + 0.5i -0.346573590 + 0.785398163i 0.500000000 + 0.500000000i
3 -0.5 + 0.5i -0.346573590 + 2.356194490i -0.500000000 + 0.500000000i
4 -0.5 - 0.5i -0.346573590 - 2.356194490i -0.500000000 - 0.500000000i
5 0.5 - 0.5i -0.346573590 - 0.785398163i 0.500000000 - 0.500000000i
6 1.0 + 0.0i 0.000000000 + 0.000000000i 1.000000000 + 0.000000000i
7 1.0 + 1.0i 0.346573590 + 0.785398163i 1.000000000 + 1.000000000i
8 0.0 + 1.0i 0.000000000 + 1.570796327i 0.000000000 + 1.000000000i
9 -1.0 + 1.0i 0.346573590 + 2.356194490i -1.000000000 + 1.000000000i
10 -1.0 + 0.0i 0.000000000 + 3.141592654i -1.000000000 + 0.000000000i
11 -1.0 - 1.0i 0.346573590 - 2.356194490i -1.000000000 - 1.000000000i
12 0.0 - 1.0i 0.000000000 - 1.570796327i 0.000000000 - 1.000000000i
13 1.0 - 1.0i 0.346573590 - 0.785398163i 1.000000000 - 1.000000000i
14 5.0 + 0.0i 1.609437912 + 0.000000000i 5.000000000 + 0.000000000i
15 5.0 + 3.0i 1.763180262 + 0.540419500i 5.000000000 + 3.000000000i
16 0.0 + 3.0i 1.098612289 + 1.570796327i 0.000000000 + 3.000000000i
17 -5.0 + 3.0i 1.763180262 + 2.601173153i -5.000000000 + 3.000000000i
18 -5.0 + 0.0i 1.609437912 + 3.141592654i -5.000000000 + 0.000000000i
19 -5.0 - 3.0i 1.763180262 - 2.601173153i -5.000000000 - 3.000000000i
20 0.0 - 3.0i 1.098612289 - 1.570796327i 0.000000000 - 3.000000000i
21 -5.0 - 3.0i 1.763180262 - 2.601173153i -5.000000000 - 3.000000000i
22 -20.0 + 20.0i 3.342305864 + 2.356194490i -20.000000000 +20.000000000i
Complex exponential: CExp = EXP(z)
EXP(z)
z rectangular LN( EXP(z) ) = z
------------ --------------------------- ---------------------------
1 0.0 + 0.0i 1.000000000 + 0.000000000i 0.000000000 + 0.000000000i
2 0.5 + 0.5i 1.446889037 + 0.790439083i 0.500000000 + 0.500000000i
3 -0.5 + 0.5i 0.532280730 + 0.290786288i -0.500000000 + 0.500000000i
4 -0.5 - 0.5i 0.532280730 - 0.290786288i -0.500000000 - 0.500000000i
5 0.5 - 0.5i 1.446889037 - 0.790439083i 0.500000000 - 0.500000000i
6 1.0 + 0.0i 2.718281828 + 0.000000000i 1.000000000 + 0.000000000i
7 1.0 + 1.0i 1.468693940 + 2.287355287i 1.000000000 + 1.000000000i
8 0.0 + 1.0i 0.540302306 + 0.841470985i 0.000000000 + 1.000000000i
9 -1.0 + 1.0i 0.198766110 + 0.309559876i -1.000000000 + 1.000000000i
10 -1.0 + 0.0i 0.367879441 + 0.000000000i -1.000000000 + 0.000000000i
11 -1.0 - 1.0i 0.198766110 - 0.309559876i -1.000000000 - 1.000000000i
12 0.0 - 1.0i 0.540302306 - 0.841470985i 0.000000000 - 1.000000000i
13 1.0 - 1.0i 1.468693940 - 2.287355287i 1.000000000 - 1.000000000i
14 5.0 + 0.0i 148.4131591 + 0.0000000i 5.0000000 + 0.0000000i
15 5.0 + 3.0i -146.9279139 + 20.9440662i 5.0000000 + 3.0000000i
16 0.0 + 3.0i -0.989992497 + 0.141120008i 0.000000000 + 3.000000000i
17 -5.0 + 3.0i -0.006670517 + 0.000950859i -5.000000000 + 3.000000000i
18 -5.0 + 0.0i 0.006737947 + 0.000000000i -5.000000000 + 0.000000000i
19 -5.0 - 3.0i -0.006670517 - 0.000950859i -5.000000000 - 3.000000000i
20 0.0 - 3.0i -0.989992497 - 0.141120008i 0.000000000 - 3.000000000i
21 -5.0 - 3.0i -0.006670517 - 0.000950859i -5.000000000 - 3.000000000i
22 -20.0 + 20.0i 0.000000001 + 0.000000002i -20.000000000 + 1.150444078i
Complex power: CPwr = z1^z2
z^(-1+i) z^(-1+i)
z rectangular polar
------------ --------------------------- -----------------------------
1 0.0 + 0.0i undefined
2 0.5 + 0.5i 0.273957254 - 0.583700759i 0.644793884*CIS(-1.131971754)
3 -0.5 + 0.5i -0.121339466 - 0.056950118i 0.134039479*CIS(-2.702768080)
4 -0.5 - 0.5i -6.339560605 +13.507239848i 14.920977079*CIS( 2.009620900)
5 0.5 - 0.5i 2.807879297 + 1.317865173i 3.101766394*CIS( 0.438824573)
6 1.0 + 0.0i 1.000000000 + 0.000000000i 1.000000000*CIS( 0.000000000)
7 1.0 + 1.0i 0.291850379 - 0.136978627i 0.322396942*CIS(-0.438824573)
8 0.0 + 1.0i 0.000000000 - 0.207879576i 0.207879576*CIS(-1.570796327)
9 -1.0 + 1.0i -0.028475059 - 0.060669733i 0.067019740*CIS(-2.009620900)
10 -1.0 + 0.0i -0.043213918 + 0.000000000i 0.043213918*CIS(-3.141592654)
11 -1.0 - 1.0i -6.753619924 + 3.169780303i 7.460488539*CIS( 2.702768080)
12 0.0 - 1.0i 0.000000000 + 4.810477381i 4.810477381*CIS( 1.570796327)
13 1.0 - 1.0i 0.658932586 + 1.403939649i 1.550883197*CIS( 1.131971754)
14 5.0 + 0.0i -0.007726394 + 0.199850701i 0.200000000*CIS( 1.609437912)
15 5.0 + 3.0i 0.034070593 + 0.093909115i 0.099898585*CIS( 1.222760762)
16 0.0 + 3.0i 0.061710926 - 0.031516790i 0.069293192*CIS(-0.472184038)
17 -5.0 + 3.0i 0.008511047 - 0.009456941i 0.012722879*CIS(-0.837992891)
18 -5.0 + 0.0i 0.000333888 - 0.008636332i 0.008642784*CIS(-1.532154741)
19 -5.0 - 3.0i -0.788417122 - 2.173121965i 2.311722438*CIS(-1.918831892)
20 0.0 - 3.0i -1.428033572 + 0.729320361i 1.603492460*CIS( 2.669408615)
21 -5.0 - 3.0i -0.788417122 - 2.173121965i 2.311722438*CIS(-1.918831892)
Complex cosine: CCos = COS(z)
COS(z) COS(z)
z rectangular polar
------------ --------------------------- -----------------------------
1 0.0 + 0.0i 1.000000000 + 0.000000000i 1.000000000*CIS( 0.000000000)
2 0.5 + 0.5i 0.989584883 - 0.249826398i 1.020632877*CIS(-0.247288622)
3 -0.5 + 0.5i 0.989584883 + 0.249826398i 1.020632877*CIS( 0.247288622)
4 -0.5 - 0.5i 0.989584883 - 0.249826398i 1.020632877*CIS(-0.247288622)
5 0.5 - 0.5i 0.989584883 + 0.249826398i 1.020632877*CIS( 0.247288622)
6 1.0 + 0.0i 0.540302306 + 0.000000000i 0.540302306*CIS( 0.000000000)
7 1.0 + 1.0i 0.833730025 - 0.988897706i 1.293454455*CIS(-0.870327425)
8 0.0 + 1.0i 1.543080635 + 0.000000000i 1.543080635*CIS( 0.000000000)
9 -1.0 + 1.0i 0.833730025 + 0.988897706i 1.293454455*CIS( 0.870327425)
10 -1.0 + 0.0i 0.540302306 + 0.000000000i 0.540302306*CIS( 0.000000000)
11 -1.0 - 1.0i 0.833730025 - 0.988897706i 1.293454455*CIS(-0.870327425)
12 0.0 - 1.0i 1.543080635 + 0.000000000i 1.543080635*CIS( 0.000000000)
13 1.0 - 1.0i 0.833730025 + 0.988897706i 1.293454455*CIS( 0.870327425)
14 5.0 + 0.0i 0.283662185 + 0.000000000i 0.283662185*CIS( 0.000000000)
15 5.0 + 3.0i 2.8558150 + 9.6063834i 10.0218902*CIS( 1.2818340)
16 0.0 + 3.0i 10.0676620 + 0.0000000i 10.0676620*CIS( 0.0000000)
17 -5.0 + 3.0i 2.8558150 - 9.6063834i 10.0218902*CIS( -1.2818340)
18 -5.0 + 0.0i 0.283662185 + 0.000000000i 0.283662185*CIS( 0.000000000)
19 -5.0 - 3.0i 2.8558150 + 9.6063834i 10.0218902*CIS( 1.2818340)
20 0.0 - 3.0i 10.0676620 + 0.0000000i 10.0676620*CIS( 0.0000000)
21 -5.0 - 3.0i 2.8558150 + 9.6063834i 10.0218902*CIS( 1.2818340)
Complex sine: CSin = SIN(z)
SIN(z)
z rectangular SIN^2(z)+COS^2(z)=1
------------ --------------------------- ---------------------------
1 0.0 + 0.0i 0.000000000 + 0.000000000i 1.000000000 + 0.000000000i
2 0.5 + 0.5i 0.540612686 + 0.457304153i 1.000000000 + 0.000000000i
3 -0.5 + 0.5i -0.540612686 + 0.457304153i 1.000000000 + 0.000000000i
4 -0.5 - 0.5i -0.540612686 - 0.457304153i 1.000000000 + 0.000000000i
5 0.5 - 0.5i 0.540612686 - 0.457304153i 1.000000000 + 0.000000000i
6 1.0 + 0.0i 0.841470985 + 0.000000000i 1.000000000 + 0.000000000i
7 1.0 + 1.0i 1.298457581 + 0.634963915i 1.000000000 + 0.000000000i
8 0.0 + 1.0i 0.000000000 + 1.175201194i 1.000000000 + 0.000000000i
9 -1.0 + 1.0i -1.298457581 + 0.634963915i 1.000000000 + 0.000000000i
10 -1.0 + 0.0i -0.841470985 + 0.000000000i 1.000000000 + 0.000000000i
11 -1.0 - 1.0i -1.298457581 - 0.634963915i 1.000000000 + 0.000000000i
12 0.0 - 1.0i 0.000000000 - 1.175201194i 1.000000000 + 0.000000000i
13 1.0 - 1.0i 1.298457581 - 0.634963915i 1.000000000 + 0.000000000i
14 5.0 + 0.0i -0.958924275 + 0.000000000i 1.000000000 + 0.000000000i
15 5.0 + 3.0i -9.6541255 + 2.8416923i 1.000000000 + 0.000000000i
16 0.0 + 3.0i 0.0000000 + 10.0178749i 1.000000000 + 0.000000000i
17 -5.0 + 3.0i 9.6541255 + 2.8416923i 1.000000000 + 0.000000000i
18 -5.0 + 0.0i 0.958924275 + 0.000000000i 1.000000000 + 0.000000000i
19 -5.0 - 3.0i 9.6541255 - 2.8416923i 1.000000000 + 0.000000000i
20 0.0 - 3.0i 0.0000000 - 10.0178749i 1.000000000 + 0.000000000i
21 -5.0 - 3.0i 9.6541255 - 2.8416923i 1.000000000 + 0.000000000i
Complex tangent: CTan = TAN(z)
TAN(z) TAN(z)
z rectangular polar
------------ --------------------------- -----------------------------
1 0.0 + 0.0i 0.000000000 + 0.000000000i 0.000000000*CIS( 0.000000000)
2 0.5 + 0.5i 0.403896455 + 0.564083141i 0.693773837*CIS( 0.949397477)
3 -0.5 + 0.5i -0.403896455 + 0.564083141i 0.693773837*CIS( 2.192195177)
4 -0.5 - 0.5i -0.403896455 - 0.564083141i 0.693773837*CIS(-2.192195177)
5 0.5 - 0.5i 0.403896455 - 0.564083141i 0.693773837*CIS(-0.949397477)
6 1.0 + 0.0i 1.557407725 + 0.000000000i 1.557407725*CIS( 0.000000000)
7 1.0 + 1.0i 0.271752585 + 1.083923327i 1.117470021*CIS( 1.325147658)
8 0.0 + 1.0i 0.000000000 + 0.761594156i 0.761594156*CIS( 1.570796327)
9 -1.0 + 1.0i -0.271752585 + 1.083923327i 1.117470021*CIS( 1.816444995)
10 -1.0 + 0.0i -1.557407725 + 0.000000000i 1.557407725*CIS( 3.141592654)
11 -1.0 - 1.0i -0.271752585 - 1.083923327i 1.117470021*CIS(-1.816444995)
12 0.0 - 1.0i 0.000000000 - 0.761594156i 0.761594156*CIS(-1.570796327)
13 1.0 - 1.0i 0.271752585 - 1.083923327i 1.117470021*CIS(-1.325147658)
14 5.0 + 0.0i -3.380515006 + 0.000000000i 3.380515006*CIS( 3.141592654)
15 5.0 + 3.0i -0.002708236 + 1.004164711i 1.004168363*CIS( 1.573493324)
16 0.0 + 3.0i 0.000000000 + 0.995054754i 0.995054754*CIS( 1.570796327)
17 -5.0 + 3.0i 0.002708236 + 1.004164711i 1.004168363*CIS( 1.568099330)
18 -5.0 + 0.0i 3.380515006 + 0.000000000i 3.380515006*CIS( 0.000000000)
19 -5.0 - 3.0i 0.002708236 - 1.004164711i 1.004168363*CIS(-1.568099330)
20 0.0 - 3.0i 0.000000000 - 0.995054754i 0.995054754*CIS(-1.570796327)
21 -5.0 - 3.0i 0.002708236 - 1.004164711i 1.004168363*CIS(-1.568099330)
Complex hyperbolic cosine: CCosh = COSH(z)
COSH(z) COSH(z)
z rectangular polar
------------ --------------------------- -----------------------------
1 0.0 + 0.0i 1.000000000 + 0.000000000i 1.000000000*CIS( 0.000000000)
2 0.5 + 0.5i 0.989584883 + 0.249826398i 1.020632877*CIS( 0.247288622)
3 -0.5 + 0.5i 0.989584883 - 0.249826398i 1.020632877*CIS(-0.247288622)
4 -0.5 - 0.5i 0.989584883 + 0.249826398i 1.020632877*CIS( 0.247288622)
5 0.5 - 0.5i 0.989584883 - 0.249826398i 1.020632877*CIS(-0.247288622)
6 1.0 + 0.0i 1.543080635 + 0.000000000i 1.543080635*CIS( 0.000000000)
7 1.0 + 1.0i 0.833730025 + 0.988897706i 1.293454455*CIS( 0.870327425)
8 0.0 + 1.0i 0.540302306 + 0.000000000i 0.540302306*CIS( 0.000000000)
9 -1.0 + 1.0i 0.833730025 - 0.988897706i 1.293454455*CIS(-0.870327425)
10 -1.0 + 0.0i 1.543080635 + 0.000000000i 1.543080635*CIS( 0.000000000)
11 -1.0 - 1.0i 0.833730025 + 0.988897706i 1.293454455*CIS( 0.870327425)
12 0.0 - 1.0i 0.540302306 + 0.000000000i 0.540302306*CIS( 0.000000000)
13 1.0 - 1.0i 0.833730025 - 0.988897706i 1.293454455*CIS(-0.870327425)
14 5.0 + 0.0i 74.2099485 + 0.0000000i 74.2099485*CIS( 0.0000000)
15 5.0 + 3.0i -73.4672922 + 10.4715577i 74.2098143*CIS( 3.0000127)
16 0.0 + 3.0i -0.989992497 + 0.000000000i 0.989992497*CIS( 3.141592654)
17 -5.0 + 3.0i -73.4672922 - 10.4715577i 74.2098143*CIS( -3.0000127)
18 -5.0 + 0.0i 74.2099485 + 0.0000000i 74.2099485*CIS( 0.0000000)
19 -5.0 - 3.0i -73.4672922 + 10.4715577i 74.2098143*CIS( 3.0000127)
20 0.0 - 3.0i -0.989992497 + 0.000000000i 0.989992497*CIS( 3.141592654)
21 -5.0 - 3.0i -73.4672922 + 10.4715577i 74.2098143*CIS( 3.0000127)
Complex hyperbolic sine: CSinh = SINH(z)
SINH(z)
z rectangular COSH^2(z)-SINH^2(z)=1
------------ --------------------------- ---------------------------
1 0.0 + 0.0i 0.000000000 + 0.000000000i 1.000000000 + 0.000000000i
2 0.5 + 0.5i 0.457304153 + 0.540612686i 1.000000000 + 0.000000000i
3 -0.5 + 0.5i -0.457304153 + 0.540612686i 1.000000000 + 0.000000000i
4 -0.5 - 0.5i -0.457304153 - 0.540612686i 1.000000000 + 0.000000000i
5 0.5 - 0.5i 0.457304153 - 0.540612686i 1.000000000 + 0.000000000i
6 1.0 + 0.0i 1.175201194 + 0.000000000i 1.000000000 + 0.000000000i
7 1.0 + 1.0i 0.634963915 + 1.298457581i 1.000000000 + 0.000000000i
8 0.0 + 1.0i 0.000000000 + 0.841470985i 1.000000000 + 0.000000000i
9 -1.0 + 1.0i -0.634963915 + 1.298457581i 1.000000000 + 0.000000000i
10 -1.0 + 0.0i -1.175201194 + 0.000000000i 1.000000000 + 0.000000000i
11 -1.0 - 1.0i -0.634963915 - 1.298457581i 1.000000000 + 0.000000000i
12 0.0 - 1.0i 0.000000000 - 0.841470985i 1.000000000 + 0.000000000i
13 1.0 - 1.0i 0.634963915 - 1.298457581i 1.000000000 + 0.000000000i
14 5.0 + 0.0i 74.2032106 + 0.0000000i 1.000000000 + 0.000000000i
15 5.0 + 3.0i -73.4606217 + 10.4725085i 1.000000000 + 0.000000000i
16 0.0 + 3.0i 0.000000000 + 0.141120008i 1.000000000 + 0.000000000i
17 -5.0 + 3.0i 73.4606217 + 10.4725085i 1.000000000 + 0.000000000i
18 -5.0 + 0.0i -74.2032106 + 0.0000000i 1.000000000 + 0.000000000i
19 -5.0 - 3.0i 73.4606217 - 10.4725085i 1.000000000 + 0.000000000i
20 0.0 - 3.0i 0.000000000 - 0.141120008i 1.000000000 + 0.000000000i
21 -5.0 - 3.0i 73.4606217 - 10.4725085i 1.000000000 + 0.000000000i
Complex hyperbolic tangent: CTanh = TANH(z)
TANH(z) TANH(z)
z rectangular polar
------------ --------------------------- -----------------------------
1 0.0 + 0.0i 0.000000000 + 0.000000000i 0.000000000*CIS( 0.000000000)
2 0.5 + 0.5i 0.564083141 + 0.403896455i 0.693773837*CIS( 0.621398850)
3 -0.5 + 0.5i -0.564083141 + 0.403896455i 0.693773837*CIS( 2.520193804)
4 -0.5 - 0.5i -0.564083141 - 0.403896455i 0.693773837*CIS(-2.520193804)
5 0.5 - 0.5i 0.564083141 - 0.403896455i 0.693773837*CIS(-0.621398850)
6 1.0 + 0.0i 0.761594156 + 0.000000000i 0.761594156*CIS( 0.000000000)
7 1.0 + 1.0i 1.083923327 + 0.271752585i 1.117470021*CIS( 0.245648668)
8 0.0 + 1.0i 0.000000000 + 1.557407725i 1.557407725*CIS( 1.570796327)
9 -1.0 + 1.0i -1.083923327 + 0.271752585i 1.117470021*CIS( 2.895943985)
10 -1.0 + 0.0i -0.761594156 + 0.000000000i 0.761594156*CIS( 3.141592654)
11 -1.0 - 1.0i -1.083923327 - 0.271752585i 1.117470021*CIS(-2.895943985)
12 0.0 - 1.0i 0.000000000 - 1.557407725i 1.557407725*CIS(-1.570796327)
13 1.0 - 1.0i 1.083923327 - 0.271752585i 1.117470021*CIS(-0.245648668)
14 5.0 + 0.0i 0.999909204 + 0.000000000i 0.999909204*CIS( 0.000000000)
15 5.0 + 3.0i 0.999912820 - 0.000025369i 0.999912820*CIS(-0.000025371)
16 0.0 + 3.0i 0.000000000 - 0.142546543i 0.142546543*CIS(-1.570796327)
17 -5.0 + 3.0i -0.999912820 - 0.000025369i 0.999912820*CIS(-3.141567283)
18 -5.0 + 0.0i -0.999909204 + 0.000000000i 0.999909204*CIS( 3.141592654)
19 -5.0 - 3.0i -0.999912820 + 0.000025369i 0.999912820*CIS( 3.141567283)
20 0.0 - 3.0i 0.000000000 + 0.142546543i 0.142546543*CIS( 1.570796327)
21 -5.0 - 3.0i -0.999912820 + 0.000025369i 0.999912820*CIS( 3.141567283)
Absolute value of complex number: CAbs = ABS(z)
z ABS(z)
------------ ------------
1 0.0 + 0.0i 0.000000000
2 0.5 + 0.5i 0.707106781
3 -0.5 + 0.5i 0.707106781
4 -0.5 - 0.5i 0.707106781
5 0.5 - 0.5i 0.707106781
6 1.0 + 0.0i 1.000000000
7 1.0 + 1.0i 1.414213562
8 0.0 + 1.0i 1.000000000
9 -1.0 + 1.0i 1.414213562
10 -1.0 + 0.0i 1.000000000
11 -1.0 - 1.0i 1.414213562
12 0.0 - 1.0i 1.000000000
13 1.0 - 1.0i 1.414213562
14 5.0 + 0.0i 5.000000000
15 5.0 + 3.0i 5.830951895
16 0.0 + 3.0i 3.000000000
17 -5.0 + 3.0i 5.830951895
18 -5.0 + 0.0i 5.000000000
19 -5.0 - 3.0i 5.830951895
20 0.0 - 3.0i 3.000000000
21 -5.0 - 3.0i 5.830951895
Complex integer power: CIntPwr = z^n (using DeMoivre's Theorem)
z^3 z^3
z rectangular polar
------------ --------------------------- -----------------------------
1 0.0 + 0.0i undefined
2 0.5 + 0.5i -0.250000000 + 0.250000000i 0.353553391*CIS( 2.356194490)
3 -0.5 + 0.5i 0.250000000 + 0.250000000i 0.353553391*CIS( 0.785398163)
4 -0.5 - 0.5i 0.250000000 - 0.250000000i 0.353553391*CIS(-0.785398163)
5 0.5 - 0.5i -0.250000000 - 0.250000000i 0.353553391*CIS(-2.356194490)
6 1.0 + 0.0i 1.000000000 + 0.000000000i 1.000000000*CIS( 0.000000000)
7 1.0 + 1.0i -2.000000000 + 2.000000000i 2.828427125*CIS( 2.356194490)
8 0.0 + 1.0i 0.000000000 - 1.000000000i 1.000000000*CIS(-1.570796327)
9 -1.0 + 1.0i 2.000000000 + 2.000000000i 2.828427125*CIS( 0.785398163)
10 -1.0 + 0.0i -1.000000000 + 0.000000000i 1.000000000*CIS( 3.141592654)
11 -1.0 - 1.0i 2.000000000 - 2.000000000i 2.828427125*CIS(-0.785398163)
12 0.0 - 1.0i 0.000000000 + 1.000000000i 1.000000000*CIS( 1.570796327)
13 1.0 - 1.0i -2.000000000 - 2.000000000i 2.828427125*CIS(-2.356194490)
14 5.0 + 0.0i 125.0000000 + 0.0000000i 125.0000000*CIS( 0.0000000)
15 5.0 + 3.0i -10.0000000 + 198.0000000i 198.2523644*CIS( 1.6212585)
16 0.0 + 3.0i 0.0000000 - 27.0000000i 27.0000000*CIS( -1.5707963)
17 -5.0 + 3.0i 10.0000000 + 198.0000000i 198.2523644*CIS( 1.5203342)
18 -5.0 + 0.0i -125.0000000 + 0.0000000i 125.0000000*CIS( 3.1415927)
19 -5.0 - 3.0i 10.0000000 - 198.0000000i 198.2523644*CIS( -1.5203342)
20 0.0 - 3.0i 0.0000000 + 27.0000000i 27.0000000*CIS( 1.5707963)
21 -5.0 - 3.0i 10.0000000 - 198.0000000i 198.2523644*CIS( -1.5203342)
Complex conjugate: CConjugate = z*
z* z*
z rectangular polar
------------ --------------------------- -----------------------------
1 0.0 + 0.0i 0.00000000 + 0.00000000i 0.00000000*CIS( 0.00000000)
2 0.5 + 0.5i 0.50000000 - 0.50000000i 0.70710678*CIS( -0.78539816)
3 -0.5 + 0.5i -0.50000000 - 0.50000000i 0.70710678*CIS( -2.35619449)
4 -0.5 - 0.5i -0.50000000 + 0.50000000i 0.70710678*CIS( 2.35619449)
5 0.5 - 0.5i 0.50000000 + 0.50000000i 0.70710678*CIS( 0.78539816)
6 1.0 + 0.0i 1.00000000 + 0.00000000i 1.00000000*CIS( 0.00000000)
7 1.0 + 1.0i 1.00000000 - 1.00000000i 1.41421356*CIS( -0.78539816)
8 0.0 + 1.0i 0.00000000 - 1.00000000i 1.00000000*CIS( -1.57079633)
9 -1.0 + 1.0i -1.00000000 - 1.00000000i 1.41421356*CIS( -2.35619449)
10 -1.0 + 0.0i -1.00000000 + 0.00000000i 1.00000000*CIS( 3.14159265)
11 -1.0 - 1.0i -1.00000000 + 1.00000000i 1.41421356*CIS( 2.35619449)
12 0.0 - 1.0i 0.00000000 + 1.00000000i 1.00000000*CIS( 1.57079633)
13 1.0 - 1.0i 1.00000000 + 1.00000000i 1.41421356*CIS( 0.78539816)
14 5.0 + 0.0i 5.00000000 + 0.00000000i 5.00000000*CIS( 0.00000000)
15 5.0 + 3.0i 5.00000000 - 3.00000000i 5.83095189*CIS( -0.54041950)
16 0.0 + 3.0i 0.00000000 - 3.00000000i 3.00000000*CIS( -1.57079633)
17 -5.0 + 3.0i -5.00000000 - 3.00000000i 5.83095189*CIS( -2.60117315)
18 -5.0 + 0.0i -5.00000000 + 0.00000000i 5.00000000*CIS( 3.14159265)
19 -5.0 - 3.0i -5.00000000 + 3.00000000i 5.83095189*CIS( 2.60117315)
20 0.0 - 3.0i 0.00000000 + 3.00000000i 3.00000000*CIS( 1.57079633)
21 -5.0 - 3.0i -5.00000000 + 3.00000000i 5.83095189*CIS( 2.60117315)
Complex square root: CSqrt = SQRT(z)
SQRT(z) SQRT(z)
z root 1 root 2
------------ --------------------------- ---------------------------
1 0.0 + 0.0i 0.000000000 + 0.000000000i 0.000000000 + 0.000000000i
2 0.5 + 0.5i 0.776886987 + 0.321797126i -0.776886987 - 0.321797126i
3 -0.5 + 0.5i 0.321797126 + 0.776886987i -0.321797126 - 0.776886987i
4 -0.5 - 0.5i 0.321797126 - 0.776886987i -0.321797126 + 0.776886987i
5 0.5 - 0.5i 0.776886987 - 0.321797126i -0.776886987 + 0.321797126i
6 1.0 + 0.0i 1.000000000 + 0.000000000i -1.000000000 + 0.000000000i
7 1.0 + 1.0i 1.098684113 + 0.455089861i -1.098684113 - 0.455089861i
8 0.0 + 1.0i 0.707106781 + 0.707106781i -0.707106781 - 0.707106781i
9 -1.0 + 1.0i 0.455089861 + 1.098684113i -0.455089861 - 1.098684113i
10 -1.0 + 0.0i 0.000000000 + 1.000000000i 0.000000000 - 1.000000000i
11 -1.0 - 1.0i 0.455089861 - 1.098684113i -0.455089861 + 1.098684113i
12 0.0 - 1.0i 0.707106781 - 0.707106781i -0.707106781 + 0.707106781i
13 1.0 - 1.0i 1.098684113 - 0.455089861i -1.098684113 + 0.455089861i
14 5.0 + 0.0i 2.236067977 + 0.000000000i -2.236067977 + 0.000000000i
15 5.0 + 3.0i 2.327117519 + 0.644574237i -2.327117519 - 0.644574237i
16 0.0 + 3.0i 1.224744871 + 1.224744871i -1.224744871 - 1.224744871i
17 -5.0 + 3.0i 0.644574237 + 2.327117519i -0.644574237 - 2.327117519i
18 -5.0 + 0.0i 0.000000000 + 2.236067977i 0.000000000 - 2.236067977i
19 -5.0 - 3.0i 0.644574237 - 2.327117519i -0.644574237 + 2.327117519i
20 0.0 - 3.0i 1.224744871 - 1.224744871i -1.224744871 + 1.224744871i
21 -5.0 - 3.0i 0.644574237 - 2.327117519i -0.644574237 + 2.327117519i
The three cube roots of -1+i: (-1+i)^(1/3)
(See Schaum's Outline Series "Complex Variables", 1964, p. 18, problem 29.)
z^(1/3) z^(1/3)
z rectangular polar
------------ --------------------------- -----------------------------
0 -1.0 + 1.0i 0.793700526 + 0.793700526i 1.122462048*CIS( 0.785398163)
1 -1.0 + 1.0i -1.084215081 + 0.290514556i 1.122462048*CIS( 2.879793266)
2 -1.0 + 1.0i 0.290514556 - 1.084215081i 1.122462048*CIS(-1.308996939)
Complex Bessel function: CI0 = I0(z)
I0(z) I0(z)
z rectangular polar
------------ --------------------------- -----------------------------
1 0.0 + 0.0i 1.000000000 + 0.000000000i 1.000000000*CIS( 0.000000000)
2 0.5 + 0.5i 0.996094174 + 0.124945749i 1.003899917*CIS( 0.124783947)
3 -0.5 + 0.5i 0.996094174 - 0.124945749i 1.003899917*CIS(-0.124783947)
4 -0.5 - 0.5i 0.996094174 + 0.124945749i 1.003899917*CIS( 0.124783947)
5 0.5 - 0.5i 0.996094174 - 0.124945749i 1.003899917*CIS(-0.124783947)
6 1.0 + 0.0i 1.266065878 + 0.000000000i 1.266065878*CIS( 0.000000000)
7 1.0 + 1.0i 0.937608477 + 0.496529948i 1.060967316*CIS( 0.487023340)
8 0.0 + 1.0i 0.765197687 + 0.000000000i 0.765197687*CIS( 0.000000000)
9 -1.0 + 1.0i 0.937608477 - 0.496529948i 1.060967316*CIS(-0.487023340)
10 -1.0 + 0.0i 1.266065878 + 0.000000000i 1.266065878*CIS( 0.000000000)
11 -1.0 - 1.0i 0.937608477 + 0.496529948i 1.060967316*CIS( 0.487023340)
12 0.0 - 1.0i 0.765197687 + 0.000000000i 0.765197687*CIS( 0.000000000)
13 1.0 - 1.0i 0.937608477 - 0.496529948i 1.060967316*CIS(-0.487023340)
14 5.0 + 0.0i 27.2398718 + 0.0000000i 27.2398718*CIS( 0.0000000)
15 5.0 + 3.0i -22.7714931 + 10.3008933i 24.9929850*CIS( 2.7167786)
16 0.0 + 3.0i -0.260051955 + 0.000000000i 0.260051955*CIS( 3.141592654)
17 -5.0 + 3.0i -22.7714931 - 10.3008933i 24.9929850*CIS( -2.7167786)
18 -5.0 + 0.0i 27.2398718 + 0.0000000i 27.2398718*CIS( 0.0000000)
19 -5.0 - 3.0i -22.7714931 + 10.3008933i 24.9929850*CIS( 2.7167786)
20 0.0 - 3.0i -0.260051955 + 0.000000000i 0.260051955*CIS( 3.141592654)
21 -5.0 - 3.0i -22.7714931 + 10.3008933i 24.9929850*CIS( 2.7167786)
Complex Bessel function: CJ0 = J0(z)
J0(z) J0(z)
z rectangular polar
------------ --------------------------- -----------------------------
1 0.0 + 0.0i 1.000000000 + 0.000000000i 1.000000000*CIS( 0.000000000)
2 0.5 + 0.5i 0.996094174 - 0.124945749i 1.003899917*CIS(-0.124783947)
3 -0.5 + 0.5i 0.996094174 + 0.124945749i 1.003899917*CIS( 0.124783947)
4 -0.5 - 0.5i 0.996094174 - 0.124945749i 1.003899917*CIS(-0.124783947)
5 0.5 - 0.5i 0.996094174 + 0.124945749i 1.003899917*CIS( 0.124783947)
6 1.0 + 0.0i 0.765197687 + 0.000000000i 0.765197687*CIS( 0.000000000)
7 1.0 + 1.0i 0.937608477 - 0.496529948i 1.060967316*CIS(-0.487023340)
8 0.0 + 1.0i 1.266065878 + 0.000000000i 1.266065878*CIS( 0.000000000)
9 -1.0 + 1.0i 0.937608477 + 0.496529948i 1.060967316*CIS( 0.487023340)
10 -1.0 + 0.0i 0.765197687 + 0.000000000i 0.765197687*CIS( 0.000000000)
11 -1.0 - 1.0i 0.937608477 - 0.496529948i 1.060967316*CIS(-0.487023340)
12 0.0 - 1.0i 1.266065878 + 0.000000000i 1.266065878*CIS( 0.000000000)
13 1.0 - 1.0i 0.937608477 + 0.496529948i 1.060967316*CIS( 0.487023340)
14 5.0 + 0.0i -0.177596771 + 0.000000000i 0.177596771*CIS( 3.141592654)
15 5.0 + 3.0i -0.826710665 + 3.243219941i 3.346927862*CIS( 1.820385436)
16 0.0 + 3.0i 4.880792586 + 0.000000000i 4.880792586*CIS( 0.000000000)
17 -5.0 + 3.0i -0.826710665 - 3.243219941i 3.346927862*CIS(-1.820385436)
18 -5.0 + 0.0i -0.177596771 + 0.000000000i 0.177596771*CIS( 3.141592654)
19 -5.0 - 3.0i -0.826710665 + 3.243219941i 3.346927862*CIS( 1.820385436)
20 0.0 - 3.0i 4.880792586 + 0.000000000i 4.880792586*CIS( 0.000000000)
21 -5.0 - 3.0i -0.826710665 + 3.243219941i 3.346927862*CIS( 1.820385436)
Removing "Fuzz" from real numbers for zero test:
Before: -0.000000000000032 + 0.000000000000077i
After: 0.000000000000000 + 0.000000000000000i
Before: -0.000000000000032*CIS( 3.141592653589793)
After: 0.000000000000000*CIS( 0.000000000000000)
Miscellaneous: FixAngle -- keep angle in interval (-PI..PI)
radians FixAngle
-------- --------
-4 -6.28319 0.00000
-3 -4.71239 1.57080
-2 -3.14159 -3.14159
-1 -1.57080 -1.57080
0 0.00000 0.00000
1 1.57080 1.57080
2 3.14159 3.14159
3 4.71239 -1.57080
4 6.28319 0.00000
5 7.85398 1.57080
6 9.42478 3.14159
7 10.99557 -1.57080
8 12.56637 0.00000
Real power function: Pwr = x^y
x y x^y
-------- -------- ------------
2.10000 -2.50000 0.156477451
2.10000 2.50000 6.390697145
1.40000 8.90000 5.066558830
0.00000 2.00000 0.000000000
4.20000 0.00000 1.000000000